const vm = new Vue({
    el: '#main',
    data: {
        show: {
            credits: false,
        },
        point: {
            total: '',
            list: [],
        },
    },
    methods: {
        togglePopup(b) {
            this.show.credits = b;
        },
    },
});

function apiready() {
    fxj.fixLayout();
    reqCreditsDetail();
}

async function reqCreditsDetail() {
    const close = fxj.dialog.loading({noBg: true});
    const res = await ajax({
        url: 'home/userCenter/getUserPoint',
        data: {
            pageNum: 1,
        },
    });
    close();
    if (res.err === 0) {
        vm.point = res.data;
    }
    else {
        toast(res.msg);
    }
}
